package zztest;

import org.weed.remote.util.ByteUtils;

public class Bytes {
	
	public static void test() {
		byte b = -1;
		int a = 1;
		int c = b;
		switch (b) {
		case -1:
			System.out.println("a");
			break;
			default:
				System.out.println("no");
		}
		System.out.println(a==c);
	}
	
	public static void byteIntConvertionTest() {
		int myInt = -1;
		byte[] bytes = ByteUtils.toBytes(myInt);
		ByteUtils.printBytes(bytes);
		System.out.println(ByteUtils.toInt(bytes));
	}
	
	public static void main(String[] argv) {
		byteIntConvertionTest();
	}
}
